﻿<!doctype html>

<html lang="zh">

<head>

	<meta charset="UTF-8">

	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 

	<meta name="viewport" content="width=device-width, initial-scale=1.0">

	<title>@消息</title>

	<link rel="stylesheet" type="text/css" href="/js/news/css/normalize.css" />

	<link rel="stylesheet" type="text/css" href="/js/news/css/default.css">

	<link href="/js/news/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="/js/news/css/bootstrap-theme.min.css" rel="stylesheet" type="text/css" />
    <link href="/js/news/css/site.css" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" href="/js/news/css/bootstrap-theme.min.css">
	<script src="/js/jquery/jquery.min.js"></script>
	<script src="/js/plugins/jrender/jrender.js"></script>
	<!--[if IE]>


	<![endif]-->

</head>

<body>

	<div class="htmleaf-container">

		<header class="htmleaf-header bgcolor-10" id="cl">

			<h1>@消息 <span>A Responsive jQuery News Ticker Plugin with Bootstrap</span></h1>

		</header>

		<div class="container mp30">

			<div class="row">

				<div class="col-md-4">

					<div class="panel panel-default">

						<div class="panel-heading">

							<span class="glyphicon glyphicon-list-alt"></span><b>@我的</b></div>

						<div class="panel-body">

							<div class="row" >

								<div class="col-xs-12"  id="messages">

									<ul class="demo1 " render-loop="list">

										<li class="news-item" >

											<table cellpadding="4"  >
												<tr>
													<td><img render-src="list.user.headImgUrl" width="60" class="img-circle" /></td>
													<td  render-html="list.user.nickName"></td>
													<td>在评论:</td>
													<td  render-html="list.review"></td>
													<td>@了我</td>
													<!--<td render-html="list.createTime"><br>
														Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in venenatis enim... <a href="#">Read more...</a>
													</td>-->
												</tr>
											</table>
										</li>
										<li class="news-item" >

											<table cellpadding="4"  >
												<tr>
													<td render-html="list.likeTitle"></td>
													 <td><img render-src="list.headImgUrl" width="60" class="img-circle" /></td>

													<td render-html="list.createTime">
														Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in venenatis enim... <a href="#">Read more...</a>
													</td>
												</tr>
											</table>
										</li>
										<li class="news-item" >

											<table cellpadding="4"  >
												<tr>
													<td render-html="list.likeTitle"></td>
													 <td><img src="/js/news/images/1.png" width="60" class="img-circle" /></td>

													<td render-html="list.createTime">
														Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in venenatis enim... <a href="#">Read more...</a>
													</td>
												</tr>
											</table>
										</li>
										<li class="news-item" >

											<table cellpadding="4"  >
												<tr>
													<td render-html="list.likeTitle"></td>
													 <td><img src="/js/news/images/1.png" width="60" class="img-circle" /></td>

													<td render-html="list.createTime">
														Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in venenatis enim... <a href="#">Read more...</a>
													</td>
												</tr>
											</table>
										</li>
									</ul>

								</div>
							</div>
						</div>
						<div class="panel-footer"></div>

					</div>

				</div>

			</div>

		</div>

		

	</div>

	

	<script src="/js/jquery/jquery.min.js" type="text/javascript"></script>

	<script src="../js/news/js/jquery.bootstrap.newsbox.js"></script>
	<script src="/js/plugins/jrender/jrender.js"></script>
	<script type="text/javascript">

    $(function () {

        $(".demo1").bootstrapNews({

            newsPerPage: 5,

            autoplay: true,

			pauseOnHover:true,

            direction: 'up',

            newsTickerInterval: 4000,

            onToDo: function () {

                //console.log(this);

            }

        });
        //获取当前用户id
        //从本地session中取出缓存的对象
        var user = JSON.parse(sessionStorage.getItem("user"));
        console.log(user.nickName);
        $.get("/users/atuser",{name:user.nickName},function (data) {
            console.log(data);
            //渲染到界面中
            $("#messages").renderValues({list:data});
        })
        $("#cl").click(function () {
            window.location.href="/mine/message.html";
        });
    });

</script>

</body>

</html>